﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Forum.BaseController
{
    [ApiController]
    [Route("[controller]/{action}")]
    [ApiExplorerSettings(GroupName = nameof(ApiVersions.NoAuth))]
    public class NoAuthController<TDefaultService> : ControllerBase where TDefaultService : class
    {
        protected readonly TDefaultService DefaultService;
        /// <summary>
        /// 日志
        /// </summary>
        protected readonly ILogger<NoAuthController<TDefaultService>> Log;
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="defaultService">默认服务</param>
        /// <param name="logger">默认服务</param>
        public NoAuthController(TDefaultService defaultService, ILogger<NoAuthController<TDefaultService>> logger)
        {
            DefaultService = defaultService;
            Log = logger;
        }
    }
}
